/**
 *
 */
package com.itee.street.entity;


import javafx.beans.property.SimpleBooleanProperty;

import java.util.Date;


/**
 * @author gonglei
 */

public class Term {

    private SimpleBooleanProperty checked = new SimpleBooleanProperty();

    private String termUid;

    private int pn;

    private String softwareVersion;

    private String hardwareVersion;


    private String remark;


    private double voltage;
    private double current;
    private double power;
    private double powerFactor;
    private double temperature;
    private int lightTime;
    private int dimming;
    /**
     * 累计电量,单位(kwh)
     */
    private double powerConsume;


    private Date createTime;

    public Term() {
    }

    public Term(String termUid, int pn) {
        this.termUid = termUid;
        this.pn = pn;
    }

    public Term(String termUid, String remark) {
        this.termUid = termUid;
        this.remark = remark;
    }

    @Override
    public String toString() {
        return termUid;
    }

    public int getPn() {
        return pn;
    }

    public void setPn(int pn) {
        this.pn = pn;
    }

    public String getTermUid() {
        return termUid;
    }

    public void setTermUid(String termUid) {
        this.termUid = termUid;
    }

    public String getSoftwareVersion() {
        return softwareVersion;
    }

    public void setSoftwareVersion(String softwareVersion) {
        this.softwareVersion = softwareVersion;
    }

    public String getHardwareVersion() {
        return hardwareVersion;
    }

    public void setHardwareVersion(String hardwareVersion) {
        this.hardwareVersion = hardwareVersion;
    }


    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public boolean getChecked() {
        return checked.get();
    }

    public SimpleBooleanProperty checkedProperty() {
        return checked;
    }

    public void setChecked(boolean checked) {
        this.checked.set(checked);
    }


    public void setLampData(LampData lampData) {
        this.voltage = lampData.getVoltage();
        this.current = lampData.getCurrent();
        this.power = lampData.getPower();
        this.powerFactor = lampData.getPowerFactor();
        this.temperature = lampData.getTemperature();
        this.createTime = lampData.getCreateTime();
        this.lightTime = lampData.getLightTime();
        this.dimming = lampData.getDimming();
        /**
         * 累计电量,单位(kwh)
         */
        this.powerConsume = lampData.getPowerConsume();
    }

    public double getVoltage() {
        return voltage;
    }

    public void setVoltage(double voltage) {
        this.voltage = voltage;
    }

    public double getCurrent() {
        return current;
    }

    public void setCurrent(double current) {
        this.current = current;
    }

    public double getPower() {
        return power;
    }

    public void setPower(double power) {
        this.power = power;
    }

    public double getPowerFactor() {
        return powerFactor;
    }

    public void setPowerFactor(double powerFactor) {
        this.powerFactor = powerFactor;
    }

    public double getTemperature() {
        return temperature;
    }

    public void setTemperature(double temperature) {
        this.temperature = temperature;
    }

    public int getLightTime() {
        return lightTime;
    }

    public void setLightTime(int lightTime) {
        this.lightTime = lightTime;
    }

    public int getDimming() {
        return dimming;
    }

    public void setDimming(int dimming) {
        this.dimming = dimming;
    }

    public double getPowerConsume() {
        return powerConsume;
    }

    public void setPowerConsume(double powerConsume) {
        this.powerConsume = powerConsume;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
}
